package test.ref;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class User extends People implements LoginMapper {

    @Value("admin")
    private String code;

    @Value("123456")
    private String password;

    public String grade;

    @Override
    public boolean login(String code,String password){
        if(code.equals("admin")&&password.equals("123456")){
            System.out.println("code = " + code + "password = " + password + "登入成功");
            return true;
        }
        System.out.println("code = " + code + "password = " + password + "登入失败");
        return false;
    }
}
